package noema.dataModel;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class MyTask {
	@Id
	private long id;
	private long processInstanceId;
	private String name;
	private String jsonParams;
	private String potentialOwner;

	public MyTask() {
		super();
	}

	public MyTask(long taskId,long processInstanceId, String name, String jsonParams,
			String potentialOwner) {
		super();
		this.id=taskId;
		this.processInstanceId = processInstanceId;
		this.name = name;
		this.jsonParams = jsonParams;
		this.potentialOwner = potentialOwner;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getProcessInstanceId() {
		return processInstanceId;
	}

	public void setProcessInstanceId(long processInstanceId) {
		this.processInstanceId = processInstanceId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getJsonParams() {
		return jsonParams;
	}

	public void setJsonParams(String jsonParams) {
		this.jsonParams = jsonParams;
	}

	public String getPotentialOwner() {
		return potentialOwner;
	}

	public void setPotentialOwner(String potentialOwner) {
		this.potentialOwner = potentialOwner;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MyTask other = (MyTask) obj;
		if (id != other.id)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "MyTask [id=" + id + ", processInstanceId=" + processInstanceId
				+ ", name=" + name + ", jsonParams=" + jsonParams
				+ ", potentialOwner=" + potentialOwner + "]";
	}
}
